<?php

defined('SYSPATH') or die('No direct script access.');

class Controller_Welcome extends Controller {

	public function after() {
		$this->response->body($this->_body . (Kohana::$profiling ? View::factory('profiler/stats') : ''));
		parent::after();
	}

	public function action_index() {
		$this->_body = 'привет мир!';
		$document = phpQuery::newDocumentFileXML("propfind.xml");
		//$rows = pq("d");
		pq('response')->each(function ($item) use (&$allTitles) {
			//$href[] = pq($item)->find('href')->text();
			$allTitles[] = pq($item)->find('href')->text();
		});
		//print_r($allTitles);
		foreach(pq('response') as $item){
			echo pq($item)->find('href')->text();
			//foreach(pq($item) as $a){
				//echo pq($a)->prop('href')->text().PHP_EOL;
				print_r($item);exit();
			//}
			//echo pq($item)->text();
		}
	}

}

// End Welcome
